function preview() {
    let list = document.getElementById("linklist");
    let links = list.getElementsByTagName("a");
    let preview  = document.getElementById("preview");
    preview.style.position = "absolute";
    preview.style.left = "0px";
    preview.style.top = "0px"
    links[0].onmouseover = function() {
        moveMessage("preview",-150,0,10);
    }
    links[1].onmouseover = function() {
        moveMessage("preview",-300,0,10);
    }
    links[2].onmouseover = function() {
        moveMessage("preview",-450,0,10);
    }
}
function moveMessage(elementID,final_x,final_y,interval) {
    let elem  = document.getElementById(elementID);
    let xpos = parseInt(elem.style.left);
    let ypos = parseInt(elem.style.top);
    if(elem.move) {
        clearTimeout(move)
    }
    if(xpos == final_x && ypos == final_y) return true;
    if(xpos < final_x) xpos++;
    if(xpos>final_x) xpos--;
    if(ypos<final_y) ypos++;
    if(ypos>final_y) ypos--;
    elem.style.left = xpos + "px";
    elem.style.top = ypos + "px";
    let repeat = "moveMessage('"+elementID+"',"+final_x+","+final_y+","+interval+")";
    // repeat = "moveMessage(meesage,200,100,10)" 错误，message 需要带引号
    // console.log(repeat)
    elem.move = setTimeout(repeat,interval);
}